/**
 * Created by hht on 2016/6/1.
 */
$(function () {
    var t = null;
    t = setTimeout(time, 1000);//开始执行
    function time() {
        clearTimeout(t);//清除定时器

        dt = new Date();

        document.getElementById("localtime").innerHTML = dt.Format('yyyy-MM-dd hh:mm:ss');
        t = setTimeout(time, 1000); //设定定时器，循环执行
    }
    time();
});



